
function AI(){
	this.getAction = getAction;
}

function getAction(player){
	var actions = game.getAvailableActions();
	var rNr = Math.floor(Math.random()*actions.length);
	switch(actions[rNr]){
		case (FOLD):
			player.fold();
		break;
		case (CHECK):
			player.checkCall();
		break;
		case (CALL):
			player.checkCall();
		break;
		case (RAISE):
			player.raise();
		break;
		case (ALLIN):
			player.raise();
		break;
		case (-1):
			console.log("bot can't do anything :)");
		break;
	}
	
	chat(player);
}

function chat(player){
	var rNr = Math.floor(Math.random()*100);
	var lines = ["Roses are unicorns,\r\nviolets are green,\r\nwelcome to the party,\r\nI'm Charlie Sheen",
	             "get on your bike",
	             "is this how you play?",
	             "Aces.. cool",
	             "Nice run..",
	             "Nice hand",
	             "What you've got? AK?",
	             "bring on more humans!",
	             "this game is eaasy",
	             "lol",
	             ":)",
	             "stack'em, stack'em, stack'em... TO THE TOP!!",
	             "What? What? I couldn't hear you over the sound of how awesome I am!",
	             "Ship it, Holla!",
	             "I can do this aaaaalllll day!",
	             "This is Pokaaaaa..., I bet 300!!!",
	             "Mess with the best, lose like rest.",
	             "You had it coming.",
	             "Give me my money!!!",
	             "Fold and live to fold again",
	             "Just play every hand, you can't miss them all",
	             "I need to play in a bigger game, people will play any trash at this table",
	             "Why would you raise with AK?!? AK isnt really a hand!",
	             "72 is garbage, but if they're suited, you gotta play them!",
	             "I'm winning",
	             "BANG-BANG",
	             "Resistance is futile. I will take your money one way or another."
	             ];
	if (rNr < 5) {
		sendToChat(player.name,lines[Math.floor(Math.random()*lines.length)]);
	}
}